﻿#include <iostream>

#include "SingletonHungry.h"
#include "SingletonLazy.h"

std::mutex SingletonLazy::m_mux;
SingletonLazy* SingletonLazy::m_instance = nullptr;

int main()
{
    SingletonHungry *test1 = SingletonHungry::GetInstance();
    SingletonHungry *test2 = SingletonHungry::GetInstance();
    if (test1 == test2)
    {
         std::cout << "Singleton hungry" << std::endl;
    }

    SingletonLazy* test3 = SingletonLazy::GetInstance();
    SingletonLazy* test4 = SingletonLazy::GetInstance();
    if (test3 == test4)
    {
        std::cout << "Singleton lazy" << std::endl;
    }
    
    return 0;
}
